package cn.sofwin.day0108.homework;

public class Daffodils {
    public static void main(String[] args) {
        System.out.println("100~500的水仙花数为：");
        for (int i = 100; i <= 500; i++) {
            int g = i % 10;
            int s = i / 10 % 10;
            int b = i / 100 % 10;
            if (g * g * g + s * s * s + b * b * b == i) {
                System.out.println(i);
            }

        }
    }
}
